﻿using System.Collections.Generic;
using System.ComponentModel;
using CSW.Framework.Linq;

namespace CSW.Framework.UI.Binding
{
    /// <summary>
    /// ITypedGridControllerLinq&lt;T&gt;
    /// </summary>
    /// <typeparam name="T">The item type.</typeparam>
    public interface ITypedGridControllerLinq<T> : ITypedGridController<T>
        where T : class, INotifyPropertyChanged
    {
        /// <summary>
        /// Performs a query taking into account columns added to the grid and property branching.
        /// </summary>
        /// <param name="table">The table.</param>
        /// <param name="where">The where clause.</param>
        /// <returns>The query result.</returns>
        IBindingList Query(ITableQueryProvider<T> table, IEnumerable<Where<T>> where);

        /// <summary>
        /// Creates the type async.
        /// </summary>
        /// <param name="where">The where list.</param>
        void CreateTypeAsync(List<Where<T>> where);
    }
}
